import 'package:json_annotation/json_annotation.dart';
import 'package:gzmall_app/model/p_option_value.dart';

part 'p_option_type.g.dart';

@JsonSerializable()
class POptionType extends Object {
  @JsonKey(name: 'id')
  int id;

  @JsonKey(name: 'name')
  String name;

  @JsonKey(name: 'option_value')
  List<POptionValue> optionValue;

  POptionType(
    this.id,
    this.name,
    this.optionValue,
  );

  factory POptionType.fromJson(Map<String, dynamic> srcJson) =>
      _$POptionTypeFromJson(srcJson);

  Map<String, dynamic> toJson() {
    return _$POptionTypeToJson(this);
  }
}
